<!doctype html>
[#escape x as (x)!?html]
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>发送私信 - ${site.fullNameOrName}${global.customs['poweredBy']}</title>
    [#include 'inc_meta.html'/]
    [#include 'inc_css.html'/]
    [#include 'inc_js.html'/]
    <script>
        $(function () {
            $('#sendMessageForm').validate();
            $('input[name=receiverUsername]').focus();
        });
    </script>
</head>
<body class="bg-light">
[#include 'inc_header.html'/]
<div class="container">
    <div class="row">
        <div class="col">
            [#include 'sys_member_my_header.html'/]
        </div>
    </div>
    <div class="row">
        <div class="col-lg-3 mt-3">
            <div class="list-group">
                [#include 'sys_member_my_left.html'/]
                <script>$('#leftMyMessage').addClass('active');</script>
            </div>
        </div>
        <div class="col-lg-9">
            <div class="px-3 mt-3 bg-white border">
                <div class="py-2 border-bottom d-flex align-items-center">
                    <h5 class="flex-grow-1 mb-0">发送私信</h5>
                    <a class="btn btn-primary btn-sm" href="../message">返回</a>
                </div>
                <div class="mt-3 pb-3">
                    <form id="sendMessageForm" action="${ctx}/my/message/send" method="POST">
                        <div class="form-group">
                            <label for="receiverUsername">收信人</label>
                            <input id="receiverUsername" name="receiverUsername" class="form-control" type="text"
                                   data-rule-required="true" data-rule-remote='{"url":"${ctx}/my/message/check_receiver","type":"post"}' data-msg-remote="不能发送给该用户" maxlength="100">
                        </div>
                        <div class="form-group">
                            <label for="text">内容</label>
                            <textarea id="text" name="text" class="form-control" data-rule-required="true" rows="8" maxlength="1000" onkeydown="if(event.ctrlKey&&event.keyCode===13){$('#sendMessageForm').submit();}"></textarea>
                        </div>
                        <button type="submit" class="btn btn-primary">提交</button>
                        <input type="hidden" name="nextUrl" value="${ctx}/my/message" />
                        <input type="hidden" name="timeout" value="0" />
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
[/#escape]
